<?php
class headersController {

	public function DoHeader() {

		$hour = date("G");
		
		//$headerXmas = "imageHeaderXmas";
		$headerMorning = "imageHeader";
		$headerEavning ="imageHeaderEavning";
		$headerNight= "imageHeaderNight";

		if ($hour > 19) {//night 20:00 - 23:59
			echo $headerNight;
		} 
		else if ($hour > 16) {//afternoon 17:00 - 19:59
			echo $headerEavning;
		} 
		else if ($hour > 11) {//noon 12:00 - 16:59
			echo $headerMorning;
		} 
		else if ($hour > 6) {//morning 07:00 - 11:59
			echo $headerMorning;
		} 
		 else {//night again 00:00 - 06:59
			echo $headerNight;
		}

		
		/*
		switch ($hour) {
		   case 1:
		   case 2:
		      echo '<link rel="stylesheet" type="text/css" href="../pics/header_800px.jpg"/>';
		      break;
		   case 3:
		   case 4:
		      echo '<link rel="stylesheet" type="text/css" href="../pics/header_800px_night.jpg"/>';
		      break;
		  default :
		     echo '<link rel="stylesheet" type="text/css" href="../pics/header_800px.jpg"/>';
		      break;
		}
		 * 
		 */

	}

}
